<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>
    <script>
        let arr = [1, 2, 5, 92, 1, 82, 1465, 1, 4, 8, 6, 4, 82, 9, 42, 359, 0, 5, 64, 2, 654, 1, 69, 85, 3, 4, 0, 1, ];
        // 去重
        let newArr = new Set(arr);
        console.log(newArr);
        // 转换数组
        let arrNew = Array.from(newArr);
        console.log(arrNew);
        // 排序
        function setSort(a, b) {
            return a - b;
        }
        let arrBa = arrNew.sort(setSort)
        console.log(arrBa);
        // 循环keys()，values()，entries()
        // for (let item of arrBa.keys()) {
        //     console.log(item)
        // }
        // for (let item of arrBa.values()) {
        //     console.log(item)
        // }
        // for (let item of arrBa.entries()) {
        //     console.log(item)
        // }
        // forEach使用
        arrBa.forEach((value, key) => {
            console.log(key + '<= 键名 : 键值 =>' + value)
        });
        // for of应用
    </script>
</body>

</html>